package com.kly.user.chatterService;

import com.fqgj.common.api.Response;
import com.kly.user.dto.UserConversationDto;
import com.kly.user.dto.chatter.request.ChatListReq;
import com.kly.user.dto.chatter.request.ConversationOPReq;
import com.kly.user.dto.chatter.request.ConversationReq;
import com.kly.user.dto.chatter.response.ChatListDto;
import com.kly.user.dto.chatter.response.ChatMsgReadDto;
import com.kly.user.dto.chatter.response.UserLevelDto;

import java.util.List;

/**
 * 保存聊天会话
 * @author linqu
 */
public interface ChatService {
    /**
     * 会话置顶、关注等操作
     */
    Response addConversation(ConversationOPReq req);

    /**
     * 保存会话
     */
    Response storageConversation(ConversationReq conversationReq);

    public void updateUserLeaveTime(ConversationReq req);


    Response<ChatListDto> chatList(String chatterUserCode, String modelUserCode, Integer sessionSaveFlag);

    /**
     * 会话列表
     */
    Response<ChatListDto> chatList(String chatterUserCode, String modelUserCode, Integer sessionSaveFlag, Integer pageNum, Integer pageSize);

    Response<ChatListDto> chatList(ChatListReq chatListReq);

    /**
     * 获取会话等取
     */
    Response<Integer> getChatLevel(String userCode, String modelUserCode);
    /**
     * 查询未读消息数
     */
    Response<ChatMsgReadDto> queryUnReadMessageNum(String userCode, String chatterUserCode, String modelUserCode);


    UserConversationDto queryConversation(ConversationOPReq req);

    Response readMsg(String fromUserCode, String toUserCode, String chatterUserCode);

    /**
     * 获取用户等级
     */
    Response<List<UserLevelDto>> listUserChatLevel(String chatterUserCode, String modelUserCode);
}
